ARDK for Android/com.nianticlabs.ardk.mesh/MeshDownloaderSession/download
download
[androidJvm]
suspend fun download(payload: String, getTexture: Boolean, maxDownloadSizeKb: Int? = null, timeoutMillis: Long = TIMEOUT_MS): AsyncResult<Array<MeshDownloaderData>, MeshDownloaderError>
Asynchronously downloads a mesh for a given location payload.
This function suspends execution until the download operation is complete, has failed, or has timed out.
Return
An AsyncResult which will be either AsyncResult.Success containing the mesh data, AsyncResult.Error detailing the failure reason, or AsyncResult.Timeout indicating a timeout in the download process.
Parameters
androidJvm
| payload | The VPS anchor payload string for the desired location. |
| getTexture | If true, the response will include the mesh textures. If false, image data and UVs will be empty, and a color field will be added to each vertex in the mesh. |
| maxDownloadSizeKb | (Optional) Sets a maximum size for the meshes to be downloaded, in kilobytes. Meshes above this size will not be downloaded. The default value, null, does not set a size limit. |
| timeoutMillis | The maximum time in milliseconds to wait for the download to complete. |